/**
 * Created by jerry on 2017/11/13.
 * 用户相关api
 */
import * as API from './'

export default {
  //登录
  login: params => {
    return API.POST('/account/login', params)
  },

  sumbitStation: params =>{
    return API.POST('/stars/club/status', params)
},
  /**
   * 获取应援列表 :pos
   * @param params
   */
  getSupportList:(pos,params)=>{
    return API.GET(`/vote/list`,params)
  },
  /**
   * 获取图片token  大图= bigImg；  粉丝站logo=stationLogo ； 赞助商=adLogo
   * @param type
   * @returns {*}
   */
  getUploadToken:type=>{
    return API.GET(`/image/upload/${type}`)
  },
  /**
   * 搜索明星
   * @param key
   * @returns {*}
   */
  searchStar:key=>{
    return API.GET(`/star/search/${key}`)
  },

   station:key=>{
    return API.GET(`/stars/club/sync`)
  },

  /**
   * 单个明星应援
   * @param params
   * @returns {POST}
   */
  creatGvSupport:params =>{
   return API.POST(`/vote/gv/create`, params)
},
  /**
   * 单个明星应援
   * @param params
   * @returns {POST}
   */
  creatAvSupport:params =>{
    return API.POST(`/vote/av/create`, params)
  },
  //登出
  logout: params => {
    return API.GET('/api/v2/users/logout', params)
  },



  //修改个人信息
  changeProfile: params => {
    return API.PATCH('/api/v2/users/profile', params)
  },

  //查询获取user列表(通过page分页)
  findList: params => {
    return API.GET('/api/v1/users', params)
  },
}
